<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
  <head>
    <title></title>
    <link rel="stylesheet" type="text/css" href="${path}/css/editTable.css">
    
    <script type="text/javascript">
    	function check(){
    		var lower_id = document.getElementById("lower_id").value;
     		if("" == lower_id || "0" == lower_id){
     			alert("请选择渠道名称");
     			return false;
     		}
     		
     		var num = document.getElementById("num").value;
     		if("" == num){
     			alert("请输入扣量比例");
     			return false;
     		}
     		
     		var start_time = document.getElementById("start_time").value;
     		if("" == start_time){
     			alert("请输入开始时间");
     			return false;
     		}
     		
     		var end_time = document.getElementById("end_time").value;
     		if("" == end_time){
     			alert("请输入结束时间");
     			return false;
     		}
    	}
    </script>
  </head>
  <body>
    <div>
    	<form id="addFilterForm" name="addFilterForm" method="post" action="${path }/filter/saveFilter.action" onsubmit="return check();">
    		<p>填写渠道扣量信息</p>
    		<table>
    			<tr>
    				<td>渠道名称</td>
    				<td>
    					<select id="lower_id" name="filterVo.lower_id">
		    				<option value="0">--请选择--</option>
		    				<c:if test="${partnerLowerVoList != null && fn:length(partnerLowerVoList) > 0 }">
		    					<c:forEach items="${partnerLowerVoList }" var="partnerLowerVo" varStatus="i">
		    						<option value="${partnerLowerVo.id }">${partnerLowerVo.name }</option>
		    					</c:forEach>
		    				</c:if>
		    			</select>
    					<span style="color: red;size: 2px;">&nbsp;*必选项</span>
    				</td>
    			</tr>
    			<tr>
    				<td>扣量省份</td>
    				<td>
    					<input type="text" id="province" name="filterVo.province" value="${filterVo.province }" />
    					<span style="color: red;size: 2px;">&nbsp;*不填默认全部生效  &nbsp;多个省份用英文":"分隔&nbsp;格式：北京:上海</span>
    				</td>
    			</tr>
    			<tr>
    				<td>扣量比例</td>
    				<td>
    					<input type="text" id="num" name="filterVo.num" value="${filterVo.num }" />
    					<span style="color: red;size: 2px;">%&nbsp;&nbsp;*必填项&nbsp;采用百分比</span>
    				</td>
    			</tr>
    			<tr>
    				<td>开始时间</td>
    				<td>
    					<input type="text" id="start_time" name="filterVo.start_time" value="${filterVo.start_time }" />
    					<span style="color: red;size: 2px;">&nbsp;*必填项&nbsp;格式：XX:XX</span>
    				</td>
    			</tr>
    			<tr>
    				<td>结束时间</td>
    				<td>
    					<input type="text" id="end_time" name="filterVo.end_time" value="${filterVo.end_time }" />
    					<span style="color: red;size: 2px;">&nbsp;*必填项&nbsp;格式：XX:XX</span>
    				</td>
    			</tr>
    			<tr>
    				<td colspan="2">
    					<input type="submit" name="submit" value="确认" />
    				</td>
    			</tr>
    		</table>
    	</form>
    </div>
  </body>
</html>